<template>
	<view class="page_wrapper">
		<view class="article_title">{{article.title}}</view>
		<view v-html="article.content" class="article_detail"></view>
	</view>
</template>

<script>
	import {request} from '@/utils/request.js'
	export default {
		data() {
			return {
				articleNo: '',
				article: {}
			}
		},
		onLoad(options) {
			this.articleNo = options.articleNo
			uni.showLoading()
			request.get(
				'/articles/no,' + this.articleNo, {}
			).then(res => {
				uni.hideLoading()
				this.article = res
			}).catch(err => {
				uni.hideLoading()
				console.log(err)
			})
		},
	}
</script>

<style lang="scss">
	.page_wrapper{
		.article_title{
			font-size: 17px;
			font-weight: 500;
			margin: 15px 15px 0px 15px;
			text-align: center;
		}
		.article_detail{
			margin: 15px;
		}
	}
</style>
